#ifndef ODBCPP_OS_SQL_WRAPPER_HPP
#define ODBCPP_OS_SQL_WRAPPER_HPP

#ifdef WIN32
#define NOMINMAX
#include <windows.h>
#endif

#include <sql.h>
#include <sqlext.h>

namespace odbc { namespace details 
{

/// \brief It defines aliases for the supported ODBC type identifiers, as needed by ODBC API functions.
struct odbc_types
{
	enum type_enum
	{
		odbc_char				= SQL_C_CHAR,			///< ODBC: SQLCHAR*			C++: unsigned char*
		odbc_short				= SQL_C_SSHORT,			///< ODBC: SQLSMALLINT		C++: short
		odbc_unsigned_short		= SQL_C_USHORT,			///< ODBC: SQLUSMALLINT		C++: unsigned short
		odbc_long				= SQL_C_SLONG,			///< ODBC: SQLINTEGER		C++: int
		odbc_unsigned_long		= SQL_C_ULONG,			///< ODBC: SQLUINTEGER		C++: unsigned int
		odbc_float				= SQL_C_FLOAT,
		odbc_double				= SQL_C_DOUBLE,
		odbc_bit				= SQL_C_BIT,
		odbc_signed_byte		= SQL_C_STINYINT,
		odbc_unsigned_byte		= SQL_C_UTINYINT,
		odbc_big_int			= SQL_C_SBIGINT,
		odbc_unsigned_big_int	= SQL_C_UBIGINT,
		odbc_binary				= SQL_C_BINARY,
		odbc_bookmark			= SQL_C_BOOKMARK,
		odbc_var_bookmark		= SQL_C_VARBOOKMARK,
		odbc_date				= SQL_C_TYPE_DATE,
		odbc_time				= SQL_C_TYPE_TIME,
		odbc_date_time			= SQL_C_TYPE_TIMESTAMP,
		odbc_numeric			= SQL_C_NUMERIC,
		odbc_guid				= SQL_C_GUID
	};
};

/// \brief It defines aliases for the supported SQL type identifiers, as needed by ODBC API functions.
struct sql_types
{
	enum type_enum
	{
		sql_char				= SQL_CHAR,
		sql_varchar				= SQL_VARCHAR,
		sql_long_varchar		= SQL_LONGVARCHAR,
		sql_wchar				= SQL_WCHAR,
		sql_wvarchar			= SQL_WVARCHAR,
		sql_wlong_varchar		= SQL_WLONGVARCHAR,
		sql_decimal				= SQL_DECIMAL,
		sql_numeric				= SQL_NUMERIC,
		sql_small_int			= SQL_SMALLINT,
		sql_integer				= SQL_INTEGER,
		sql_real				= SQL_REAL,
		sql_float				= SQL_FLOAT,
		sql_double				= SQL_DOUBLE,
		sql_bit					= SQL_BIT,
		sql_tiny_int			= SQL_TINYINT,
		sql_big_int				= SQL_BIGINT,
		sql_binary				= SQL_BINARY,
		sql_varbinary			= SQL_VARBINARY,
		sql_long_varbinary		= SQL_LONGVARBINARY,
		sql_date				= SQL_TYPE_DATE,
		sql_time				= SQL_TYPE_TIME,
		sql_date_time			= SQL_TYPE_TIMESTAMP
	};
};

}} // namespace details // namespace odbc 



#endif // ODBCPP_OS_SQL_WRAPPER_HPP
